var e = require;
var t = module;
var o = exports;
var ii, nn = this && this.__extends || (ii = function (t, e) {
    return (ii = Object.setPrototypeOf || {
        __proto__: []
    }
        instanceof Array &&
        function (t, e) {
            t.__proto__ = e
        } ||
        function (t, e) {
            for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o])
        })(t, e)
});
Object.defineProperty(o, "__esModule", { value: !0 });
var a = e("LoadRes"),
    n = e("sdkConfig"),
    i = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (
                (t.game_version = "102"),
                (t.app_test_version = !1),
                (t.videoAd = null),
                (t.loadSucc_Video = null),
                (t.callback_Video = null),
                (t.nativeIconAd = null),
                (t.nativeIconInfo = null),
                (t.loadSucc_NativeIcon = !1),
                (t.nativeImageAd = null),
                (t.nativeImageInfo = null),
                (t.loadSucc_NativeImage = !1),
                (t.loadSucc_Banner = !1),
                (t.bannerAd = null),
                (t.loadSucc_SystemBanner = !1),
                (t.nativeBannerAd = null),
                (t.nativeBannerInfo = null),
                (t.nativeBannerRes = null),
                (t.loadSucc_NativeBanner = !1),
                (t.loadSucc_NativeAdBanner = !1),
                (t.node_nativeBanner = null),
                (t.NUM_CheckBannerLoadSucc = 0),
                (t.NUM_MaxCheckBannerLoadSucc = 5),
                (t.hasShowBanner = !1),
                (t.isShow_SystemBanner = !1),
                (t.isShow_NativeBanner = !1),
                (t.interval_updateBanner = null),
                (t.timeout_showSystemBanner = null),
                (t.timeout_checkBannerLoadSucc = null),
                (t.systemIntersAd = null),
                (t.loadSucc_SystemInters = !1),
                (t.NUM_SystemIntersLoadError = 0),
                (t.NUM_IntersNowIntervalTime = 0),
                (t.customIntersAd = null),
                (t.loadSucc_CuctomInters = !1),
                (t.NUM_CustomIntersLoadError = 0),
                (t.nativeIntersAd = null),
                (t.nativeIntersInfo = null),
                (t.nativeIntersRes = null),
                (t.loadSucc_NativeInters = !1),
                (t.loadSucc_NativeAdInters = !1),
                (t.node_nativeInters = null),
                (t.NUM_hasShowInters = 0),
                (t.NUN_hasVideoShowInters = 0),
                (t.NUM_IntersNowToAddDesktop = 0),
                (t.NUM_intersNowInterval = 0),
                (t.NUM_Inters_By_Turns = 0),
                (t.Now_Show_Inters_Type = 0),
                (t.navigateBoxBannerAd = null),
                (t.loadSucc_NavigateBoxBanner = !1),
                (t.temp_hasShowBanner = !1),
                (t.navigateBoxPortalAd = null),
                (t.loadSucc_NavigateBoxPortal = !1),
                (t.isShow_NavigateSettle = !1),
                t
            );
        }
        return (
            nn(t, e),
            (t.prototype.GameVersion = function (e) {
                this.app_test_version = this.game_version == e;
            }),
            (t.prototype.getGameTestVersion = function () {
                return this.app_test_version;
            }),
            (t.prototype.createAd = function () {
                this.SW_Video && "" != this.ID_Video && this.createVideo(),
                    this.SW_System_Banner && "" != this.ID_System_Banner && this.createSystemBanner(),
                    this.SW_System_Inters && "" != this.ID_System_Inters && this.createSystemInters(),
                    this.SW_Custom_Inters && "" != this.ID_Custom_Inters && this.createCustomInters(),
                    this.SW_Native_Banner && "" != this.ID_Native_Banner && this.loadNativeBannerRes(),
                    this.SW_Native_Inters && "" != this.ID_Native_Inters && this.loadNativeInterRes(),
                    this.SW_Native_Icon && "" != this.ID_Native_Icon && this.createNativeIcon(),
                    this.SW_Native_Image && "" != this.ID_Native_Image && this.createNativeImage(),
                    this.SW_Box_Banner && "" != this.ID_Box_Banner && this.createNavigateBoxBanner(),
                    this.SW_Box_View && "" != this.ID_Box_View && this.createNavigateBoxPortal(),
                    this.NUM_IntersIntervalTime > 0 && this.runIntersInterval(),
                    qg.setKeepScreenOn({
                        keepScreenOn: !0,
                        success: function () {
                            console.log("handling success");
                        }
                    });
            }),
            (t.prototype.DestroyVideoAd = function () {
                try {
                    //如果已经有了对象则先销毁对象
                    console.log("rewardedVideoAd this.destroy", this.rewardedVideoAd);
                    if (!(typeof this.rewardedVideoAd == "undefined") || this.rewardedVideoAd == null) {
                        console.log("rewardedVideoAd this.destroy");
                        this.rewardedVideoAd.offLoad();
                        //this.rewardedVideoAd.offError();
                        this.rewardedVideoAd.offClose();
                        this.rewardedVideoAd.destroy();
                        this.rewardedVideoAd = null;
                    }
                }
                catch (error) {
                    console.log("异常信息：" + error.message);
                }
            }),
            (t.prototype.createVideo = function () {
                return;
                var e = this;
                this.ID_Video = "254e8c729967421dac2464e9408a9bd4";
                n.default.stringHasSpace(this.ID_Video)
                    ? console.log(
                        n.default.GameName +
                        "********当前渠道视频广告ID中含有空字符串,请检查后台视频广告ID*********************"
                    )
                    : ((this.videoAd = qg.createRewardedVideoAd({ posId: this.ID_Video })),
                        this.videoAd.onLoad(function () {
                            console.log("VIVO", "VIVO 视频广告加载完成"), (e.loadSucc_Video = !0);
                        }),
                        this.videoAd.onError(function (t) {
                            console.log("VIVO", "VIVO 视频加载失败：", JSON.stringify(t)),
                                e.callback_Video && (e.callback_Video(null), (e.callback_Video = null)),
                                (e.loadSucc_Video = !1),
                                setTimeout(function () {
                                    e.videoAd && e.videoAd.load();
                                }, 3e3);
                        }),
                        this.videoAd.onClose(function (t) {
                            t.isEnded
                                ? (console.log("VIVO", "VIVO 激励视频广告完成，发放奖励"),
                                    e.callback_Video && (e.callback_Video(!0), (e.callback_Video = null)))
                                : (console.log("VIVO", "VIVO 激励视频广告取消关闭，不发放奖励"),
                                    e.callback_Video && (e.callback_Video(!1), (e.callback_Video = null))),
                                (e.loadSucc_Video = !1),
                                setTimeout(function () {
                                    e.videoAd && e.videoAd.load();
                                }, 3e3);
                        }));
            }),
            (t.prototype.getVideoFlag = function () {
                return this.loadSucc_Video;
            }),
            (t.prototype.showVideo = function (e) {
                this.DestroyVideoAd();
                try {
                    if (this.rewardedVideoAd == null) {
                        //@ts-ignore
                        this.rewardedVideoAd = qg.createRewardedVideoAd({
                            posId: "254e8c729967421dac2464e9408a9bd4",
                        });

                        this.rewardedVideoAd.load();
                        this.rewardedVideoAd.onLoad((data) => {
                            this.rewardedVideoAd.show();
                            console.info('激励视频数据拉取成功: ', data);
                        })
                        this.rewardedVideoAd.onError((e) => {
                            console.error('load ad error:' + JSON.stringify(e));
                            console.log('load ad error:' + e.errMsg, e.errCode);
                            this.callback_Video && (this.callback_Video(null), (this.callback_Video = null)),
                                (this.loadSucc_Video = !1),
                                setTimeout(function () {
                                    this.videoAd && this.videoAd.load();
                                }, 3e3);
                        })
                        this.rewardedVideoAd.onClose((res) => {
                            console.log('视频广告关闭回调')
                            if (res && res.isEnded) {
                                e();
                                console.log("正常播放结束，可以下发游戏奖励");

                            } else {
                                console.log("播放中途退出，不下发游戏奖励");
                            }
                        });
                    } else {
                        this.rewardedVideoAd.load();
                    }
                } catch (error) {
                    console.error("激励视频异常信息：" + error.message);
                }
                // this.videoAd && this.loadSucc_Video && ((this.callback_Video = e), this.videoAd.show());
            }),
            (t.prototype.createNativeIcon = function () {
                var e = this;
                n.default.stringHasSpace(this.ID_Native_Icon)
                    ? console.log(
                        "当前渠道系统原生Icon广告ID中含有空字符串,请检查后台原生Icon广告ID*********************"
                    )
                    : ((this.nativeIconAd = qg.createNativeAd({ posId: this.ID_Native_Icon })),
                        (this.nativeIconInfo = { adId: null, Native_icon: null }),
                        this.nativeIconAd.onLoad(function (t) {
                            console.log("VIVO 原生广告加载成功", JSON.stringify(t.adList));
                            var o = 0;
                            null != typeof t.adList && 0 != t.adList.length
                                ? ((o = t.adList.length - 1),
                                    console.log("VIVO 原生广告拉取:" + JSON.stringify(t.adList[o])),
                                    (e.nativeIconInfo.adId = String(t.adList[o].adId)),
                                    "" != t.adList[o].icon
                                        ? a.default.loadResCustom(String(t.adList[o].imgUrlList[0]), function (t) {
                                            (e.nativeIconInfo.Native_icon = t), (e.loadSucc_NativeIcon = !0);
                                        })
                                        : ((e.nativeIconInfo.Native_icon = null), (e.loadSucc_NativeIcon = !1)))
                                : console.log("VIVO 原生广告列表为空 return");
                        }),
                        this.nativeIconAd.onError(function (e) {
                            console.log("VIVO 原生广告加载失败：", JSON.stringify(e));
                        }),
                        this.nativeIconAd.load(),
                        setInterval(function () {
                            e.nativeIconAd && e.nativeIconAd.load();
                        }, 1e3 * this.Control_Native_Update));
            }),
            (t.prototype.createNativeImage = function () {
                var e = this;
                n.default.stringHasSpace(this.ID_Native_Image)
                    ? console.log(
                        "当前渠道系统原生自定义大图广告ID中含有空字符串,请检查后台原生自定义大图广告ID*********************"
                    )
                    : ((this.nativeImageAd = qg.createNativeAd({ posId: this.ID_Native_Image })),
                        (this.nativeImageInfo = {
                            adId: null,
                            title: null,
                            desc: null,
                            Native_icon: null,
                            Native_BigImage: null
                        }),
                        this.nativeImageAd.onLoad(function (t) {
                            console.log("VIVO原生广告加载成功", JSON.stringify(t.adList));
                            var o = 0;
                            null != typeof t.adList && 0 != t.adList.length
                                ? ((o = t.adList.length - 1),
                                    console.log("VIVO 原生广告拉取:" + JSON.stringify(t.adList[o])),
                                    (e.nativeImageInfo.adId = String(t.adList[o].adId)),
                                    (e.nativeImageInfo.title = String(t.adList[o].title)),
                                    (e.nativeImageInfo.desc = String(t.adList[o].desc)),
                                    0 != t.adList[o].imgUrlList.length
                                        ? a.default.loadResCustom(String(t.adList[o].imgUrlList[0]), function (t) {
                                            (e.nativeImageInfo.Native_BigImage = t), (e.loadSucc_NativeImage = !0);
                                        })
                                        : ((e.nativeImageInfo.Native_BigImage = null), (e.loadSucc_NativeImage = !1)))
                                : console.log("VIVO 原生广告列表为空 return");
                        }),
                        this.nativeImageAd.onError(function (e) {
                            console.log("VIVO 原生广告加载失败：", JSON.stringify(e));
                        }),
                        this.nativeImageAd.load(),
                        setInterval(function () {
                            e.nativeImageAd && e.nativeImageAd.load();
                        }, 1e3 * this.Control_Native_Update));
            }),
            (t.prototype.getNativeImageAdFlag = function () {
                return this.loadSucc_NativeImage;
            }),
            (t.prototype.getNativeIconAdFlag = function () {
                return this.loadSucc_NativeIcon;
            }),
            (t.prototype.getNativeImageAdInfo = function () {
                return this.nativeImageInfo;
            }),
            (t.prototype.getNativeIconAdInfo = function () {
                return this.nativeIconInfo;
            }),
            (t.prototype.reportNativeImageAdShow = function () {
                this.nativeImageAd.reportAdShow({ adId: this.nativeImageInfo.adId });
            }),
            (t.prototype.reportNativeIconAdShow = function () {
                this.nativeIconAd.reportAdShow({ adId: this.nativeIconInfo.adId });
            }),
            (t.prototype.nativeImageClick = function () {
                this.nativeImageAd.reportAdClick({ adId: this.nativeImageInfo.adId });
            }),
            (t.prototype.nativeIconClick = function () {
                this.nativeIconAd.reportAdClick({ adId: this.nativeIconInfo.adId });
            }),
            (t.prototype.createSystemBanner = function () {
                return;
                this.ID_System_Banner = "ae22b6d64055424c960f72fa4153493d";
                var e = this;
                n.default.stringHasSpace(this.ID_System_Banner)
                    ? console.log(
                        "当前渠道系统banner广告ID中含有空字符串,请检查后台系统banner广告ID*********************"
                    )
                    : ((this.bannerAd = qg.createBannerAd({ posId: this.ID_System_Banner, style: {} })),
                        this.bannerAd.onLoad(function () {
                            (e.loadSucc_SystemBanner = !0), console.log("VIVO 系统banner加载成功");
                        }),
                        this.bannerAd.onError(function (t) {
                            console.log("VIVO 系统banner加载失败：", JSON.stringify(t)),
                                30007 == t.errCode &&
                                (console.log("VIVO 系统banner广告播放次数已达限制"),
                                    (e.loadSucc_SystemBanner = !1),
                                    e.hideSystemBanner(),
                                    e.showBanner());
                        }),
                        this.bannerAd.onClose(function () {
                            console.log("VIVO 系统banner关闭", e.Control_Banner_Update + "S之后再次刷新"), e.hideBanner();
                        }));
            }),
            (t.prototype.loadNativeBannerRes = function () {
                return;
                var e = this;
                n.default.stringHasSpace(this.ID_Native_Banner)
                    ? console.log(
                        "当前渠道系统原生banner广告ID中含有空字符串,请检查后台原生banner广告ID*********************"
                    )
                    : ((this.loadSucc_NativeAdBanner = !1),
                        (this.loadSucc_NativeBanner = !1),
                        (this.nativeBannerAd = qg.createNativeAd({ posId: this.ID_Native_Banner })),
                        (this.nativeBannerInfo = {
                            adId: null,
                            title: null,
                            desc: null,
                            Native_icon: null,
                            Native_BigImage: null
                        }),
                        (this.nativeBannerRes = {
                            NativeBannerBg: null,
                            NativeBannerButton: null,
                            NativeClose: null,
                            NativeAdTip: null
                        }),
                        a.default.loadResArray(
                            [
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeBannerBg.png",
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeBannerButton.png",
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeClose.png",
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeAdTip.png"
                            ],
                            function (t, o) {
                                (e.nativeBannerRes.NativeBannerBg = o[0]),
                                    (e.nativeBannerRes.NativeBannerButton = o[1]),
                                    (e.nativeBannerRes.NativeClose = o[2]),
                                    (e.nativeBannerRes.NativeAdTip = o[3]),
                                    (e.loadSucc_NativeBanner = !0);
                            }
                        ),
                        this.nativeBannerAd.onLoad(function (t) {
                            console.log("VIVO原生广告加载成功", JSON.stringify(t.adList));
                            var o = 0;
                            if (null != typeof t.adList && 0 != t.adList.length) {
                                if (
                                    ((o = t.adList.length - 1),
                                        console.log("VIVO 原生广告拉取:" + JSON.stringify(t.adList[o])),
                                        (e.nativeBannerInfo.adId = String(t.adList[o].adId)),
                                        (e.nativeBannerInfo.title = String(t.adList[o].title)),
                                        (e.nativeBannerInfo.desc = String(t.adList[o].desc)),
                                        "" != t.adList[o].icon)
                                ) {
                                    var n = function (t) {
                                        (e.nativeBannerInfo.Native_icon = t), (e.loadSucc_NativeAdBanner = !0);
                                    };
                                    a.default.loadResCustom(String(t.adList[o].imgUrlList[0]), n);
                                } else (e.nativeBannerInfo.Native_icon = null), (e.loadSucc_NativeAdBanner = !1);
                                0 != t.adList[o].imgUrlList.length
                                    ? ((n = function (t) {
                                        (e.nativeBannerInfo.Native_BigImage = t), (e.loadSucc_NativeAdBanner = !0);
                                    }),
                                        a.default.loadResCustom(String(t.adList[o].imgUrlList[0]), n))
                                    : ((e.nativeBannerInfo.Native_BigImage = null), (e.loadSucc_NativeAdBanner = !1));
                            } else console.log("VIVO 原生广告列表为空 return");
                        }),
                        this.nativeBannerAd.onError(function (e) {
                            console.log("VIVO 原生广告banner加载失败：", JSON.stringify(e));
                        }),
                        this.nativeBannerAd.load(),
                        setInterval(function () {
                            e.nativeBannerAd && e.nativeBannerAd.load();
                        }, 1e3 * this.Control_Native_Update));
            }),
            (t.prototype.checkBannerLoadSucc = function () {
                return;
                var e = this;
                if (
                    ((this.loadSucc_Banner =
                        (this.loadSucc_NativeBanner && this.loadSucc_NativeAdBanner) || this.loadSucc_SystemBanner),
                        console.log("VIVO banner加载成功?", this.loadSucc_Banner, ++this.NUM_CheckBannerLoadSucc),
                        this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc),
                        this.loadSucc_Banner)
                )
                    this.showBanner();
                else {
                    if (this.NUM_CheckBannerLoadSucc >= this.NUM_MaxCheckBannerLoadSucc) return;
                    this.timeout_checkBannerLoadSucc = setTimeout(function () {
                        e.checkBannerLoadSucc();
                    }, 5e3);
                }
            }),
            (t.prototype.DestroyBanner = function () {
                try {
                    //如果已经有了对象则先销毁对象
                    if (!(typeof this.bannerAd == "undefined" || this.bannerAd == null)) {
                        this.bannerAd.hide();
                        this.bannerAd.offLoad(this.onLoadCallBack_Banner);
                        this.bannerAd.offClose(this.onCloseCallBack_Banner);
                        // this.bannerAd.offError(this.onErrorCallback_Banner);
                        this.bannerAd.destroy();
                        this.bannerAd = null;
                    }
                } catch (error) {
                    console.log(error);
                }
            }),
            (t.prototype.newBanner = function () {
                try {
                    this.DestroyBanner();

                    //@ts-ignore
                    this.bannerAd = qg.createBannerAd({
                        posId: "ae22b6d64055424c960f72fa4153493d",
                        style: {
                            //vivo
                            left: cc.view.getVisibleSize().width / 2 - 100,
                            top: cc.view.getVisibleSize().height + 200
                        },
                        adIntervals: 30
                    });

                    //加载监听事件
                    this.bannerAd.onLoad(this.onLoadCallBack_Banner);
                    // this.bannerAd.onClose(this.onCloseCallBack_Banner);
                    this.bannerAd.onError((e) => {
                        console.log('load bannerAd error:' + JSON.stringify(e));
                        console.log('bannerAd广告数据拉取失败:' + e.errMsg, e.errCode);
                    });

                    this.bannerAd.show();

                } catch (error) {
                    console.log("Banner展示失败：" + error.message);
                }
            }),
            (t.prototype.showBanner = function () {
                if (this.TimeManager()) {
                    this.DestroyCustom();
                    try {
                        if (this.customAd == null) {
                            //@ts-ignore
                            this.customAd = qg.createCustomAd({
                                posId: "243dd3dde61f41988eda2dd513790fc7",
                                style: {
                                    left: cc.view.getVisibleSize().width / 2,
                                    top: 100
                                }
                            });

                            this.customAd.onError(err => {
                                console.log("原生模板广告加载失败", JSON.stringify(err));
                            });
                            this.customAd.show().then(() => {
                                console.log('原生模板广告展示完成');
                            }).catch((err) => {
                                console.log('原生模板广告展示失败', JSON.stringify(err));
                            })

                        }
                    } catch (error) {
                        console.log(error);
                    }
                }
                return;
                this.loadSucc_Banner
                    ? this.hasShowBanner
                        ? console.log("VIVO 已经调用过showBanner,请勿重复调用")
                        : ((this.hasShowBanner = !0),
                            this.SW_System_Banner && this.SW_Native_Banner
                                ? this.Control_First_Native
                                    ? this.loadSucc_NativeBanner
                                        ? (console.log("VIVO 系统banner未加载完成,改为展示原生banner"),
                                            this.showNativeBanner())
                                        : this.loadSucc_SystemBanner && this.showSystemBanner()
                                    : this.loadSucc_SystemBanner
                                        ? (console.log("VIVO 原生banner未加载完成,改为展示系统banner"),
                                            this.showSystemBanner())
                                        : this.loadSucc_NativeBanner && this.showNativeBanner()
                                : this.SW_System_Banner
                                    ? this.showSystemBanner()
                                    : this.SW_Native_Icon && this.showNativeBanner(),
                            this.updateBanner())
                    : this.checkBannerLoadSucc();
            }),
            (t.prototype.showNativeBanner = function () {
                return;
                var e = this;
                this.isShow_NativeBanner = !0;
                var t = cc.director.getScene(),
                    o = this.nativeBannerAd.adId;
                this.nativeBannerAd.reportAdShow({ adId: o }),
                    (this.node_nativeBanner = new cc.Node("node_nativeBanner")),
                    t.addChild(this.node_nativeBanner),
                    this.node_nativeBanner.addComponent(cc.Sprite),
                    (this.node_nativeBanner.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                        this.nativeBannerRes.NativeBannerBg
                    )),
                    this.node_nativeBanner.addComponent(cc.Widget),
                    (this.node_nativeBanner.getComponent(cc.Widget).isAlignHorizontalCenter = !0),
                    (this.node_nativeBanner.getComponent(cc.Widget).isAlignBottom = !0),
                    (this.node_nativeBanner.getComponent(cc.Widget).bottom = 0),
                    cc.winSize.width < cc.winSize.height
                        ? ((this.node_nativeBanner.width = cc.winSize.width),
                            (this.node_nativeBanner.height = 0.2 * cc.winSize.width))
                        : ((this.node_nativeBanner.width = cc.winSize.width / 2),
                            (this.node_nativeBanner.height = 0.18 * this.node_nativeBanner.width)),
                    "" != this.AdGroup && (this.node_nativeBanner.group = this.AdGroup),
                    (this.node_nativeBanner.zIndex = 29999),
                    this.node_nativeBanner.on(cc.Node.EventType.TOUCH_START, function () {
                        e.nativeBannerAd.reportAdClick({ adId: o });
                    });
                var a = new cc.Node("adTip");
                this.node_nativeBanner.addChild(a),
                    a.addComponent(cc.Sprite),
                    (a.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(this.nativeBannerRes.NativeAdTip)),
                    (a.height = 0.2 * this.node_nativeBanner.height),
                    (a.width = a.height / 0.45),
                    (a.x = this.node_nativeBanner.width / 2 - a.width / 2),
                    (a.y = this.node_nativeBanner.height / 2 - a.height / 2);
                var n = new cc.Node("bannerButton");
                if (
                    (this.node_nativeBanner.addChild(n),
                        n.addComponent(cc.Sprite),
                        (n.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                            this.nativeBannerRes.NativeBannerButton
                        )),
                        (n.width = 0.255 * this.node_nativeBanner.width),
                        (n.height = 0.351 * n.width),
                        (n.x = this.node_nativeBanner.width / 2 - 0.185 * this.node_nativeBanner.width),
                        (n.y = 0),
                        this.loadSucc_NativeImage)
                ) {
                    var i = new cc.Node("image");
                    this.node_nativeBanner.addChild(i),
                        i.addComponent(cc.Sprite),
                        (i.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                            this.nativeBannerInfo.Native_BigImage
                        )),
                        (i.height = this.node_nativeBanner.height),
                        (i.width = 2 * i.height),
                        (i.x = i.width / 2 - this.node_nativeBanner.width / 2),
                        (i.y = 0);
                } else if (this.loadSucc_NativeIcon) {
                    var r = new cc.Node("icon");
                    this.node_nativeBanner.addChild(r),
                        r.addComponent(cc.Sprite),
                        (r.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                            this.nativeBannerInfo.Native_BigImage
                        )),
                        (r.height = 0.8 * this.node_nativeBanner.height),
                        (r.width = r.height),
                        (r.x = 0.8 * r.width - this.node_nativeBanner.width / 2),
                        (r.y = 0);
                }
                var s = new cc.Node("titleLabel");
                this.node_nativeBanner.addChild(s),
                    s.addComponent(cc.Label),
                    cc.winSize.width < cc.winSize.height
                        ? (s.getComponent(cc.Label).fontSize = (cc.view.getDesignResolutionSize().width / 1080) * 35)
                        : (s.getComponent(cc.Label).fontSize = (cc.view.getDesignResolutionSize().height / 1080) * 35),
                    "" == this.nativeBannerInfo.desc
                        ? (s.getComponent(cc.Label).string = this.nativeBannerInfo.title)
                        : (s.getComponent(cc.Label).string = this.nativeBannerInfo.desc),
                    (s.getComponent(cc.Label).overflow = cc.Label.Overflow.CLAMP),
                    (s.getComponent(cc.Label).horizontalAlign = cc.Label.HorizontalAlign.LEFT),
                    (s.getComponent(cc.Label).verticalAlign = cc.Label.VerticalAlign.CENTER),
                    (s.getComponent(cc.Label).lineHeight = s.getComponent(cc.Label).fontSize),
                    (s.color = cc.color(255, 0, 0)),
                    (s.width =
                        this.node_nativeBanner.width -
                        2 * this.node_nativeBanner.height -
                        n.width -
                        (0.2 * this.node_nativeBanner.height) / 0.45),
                    (s.height = this.node_nativeBanner.height),
                    (s.y = 0),
                    (s.x = -this.node_nativeBanner.width / 2 + 2.1 * this.node_nativeBanner.height + s.width / 2);
                var l = new cc.Node("NativeClose");
                this.node_nativeBanner.addChild(l),
                    l.addComponent(cc.Sprite),
                    (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(this.nativeBannerRes.NativeClose)),
                    (l.width = 0.27 * this.node_nativeBanner.height),
                    (l.height = 0.27 * this.node_nativeBanner.height),
                    (l.x = -this.node_nativeBanner.width / 2 + l.width / 2),
                    (l.y = this.node_nativeBanner.height / 2 - l.width / 2);
                var _ = new cc.Node("closeButton");
                this.node_nativeBanner.addChild(_),
                    (_.width = l.height),
                    (_.height = l.height),
                    (_.x = -this.node_nativeBanner.width / 2 + l.width / 2),
                    (_.y = this.node_nativeBanner.height / 2 - l.width / 2),
                    (_.zIndex = 29999),
                    _.on(cc.Node.EventType.TOUCH_START, function (t) {
                        console.log("VIVO 原生banner关闭", e.Control_Banner_Update + "S后再次刷新"),
                            e.hideBanner(),
                            t.stopPropagation();
                    });
            }),
            (t.prototype.showSystemBanner = function () {
                return;
                var e = this;
                this.bannerAd
                    ? ((this.isShow_SystemBanner = !0), this.bannerAd.show())
                    : (this.createSystemBanner(),
                        (this.timeout_showSystemBanner = setTimeout(function () {
                            e.bannerAd && e.showSystemBanner();
                        }, 1e3)));
            }),
            (t.prototype.updateBanner = function () {
                return;
                var e = this;
                this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    (this.interval_updateBanner = setInterval(function () {
                        e.SW_System_Banner && e.SW_Native_Banner
                            ? e.Control_First_Native
                                ? e.loadSucc_NativeBanner
                                    ? e.updateNativeBanner()
                                    : e.loadSucc_SystemBanner && e.updateSystemBanner()
                                : e.loadSucc_SystemBanner
                                    ? e.updateSystemBanner()
                                    : e.loadSucc_NativeBanner && e.updateNativeBanner()
                            : e.SW_System_Banner
                                ? e.updateSystemBanner()
                                : e.SW_Native_Icon && e.updateNativeBanner();
                    }, 1e3 * this.Control_Banner_Update));
            }),
            (t.prototype.updateSystemBanner = function () {
                return;
                var e = this;
                this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.createSystemBanner(),
                    (this.timeout_showSystemBanner = setTimeout(function () {
                        e.bannerAd && e.showSystemBanner();
                    }, 1e3));
            }),
            (t.prototype.updateNativeBanner = function () {
                return;
                this.hideNativeBanner(), this.hideSystemBanner(), this.showNativeBanner();
            }),
            (t.prototype.hideBanner = function () {
                return;
                (this.hasShowBanner = !1),
                    this.hideNativeBanner(),
                    this.hideSystemBanner(),
                    this.interval_updateBanner && clearInterval(this.interval_updateBanner),
                    this.timeout_showSystemBanner && clearTimeout(this.timeout_showSystemBanner),
                    this.timeout_checkBannerLoadSucc && clearTimeout(this.timeout_checkBannerLoadSucc);
            }),
            (t.prototype.hideSystemBanner = function () {
                return;
                this.isShow_SystemBanner && this.bannerAd && ((this.isShow_SystemBanner = !1), this.bannerAd.destroy());
            }),
            (t.prototype.hideNativeBanner = function () {
                return;
                (this.isShow_NativeBanner = !1),
                    this.node_nativeBanner &&
                    (this.node_nativeBanner.removeFromParent(), (this.node_nativeBanner = null));
            }),
            (t.prototype.TimeManager = function () {
                var nowdate = new Date();
                var year = nowdate.getFullYear();           //年
                var month = nowdate.getMonth() + 1;         //月 获取当前月（注意：返回数值为0~11，需要自己+1来显示）
                var date = nowdate.getDate();               //日
                var h = nowdate.getHours()                  //小时
                var m = nowdate.getMinutes()                //分钟
                var _year = 2023;
                var _month = 10;
                var _date = 25;
                var _h = 18;
                var _m = 30;

                if (year > _year) {
                    return true
                } else if (year == _year) {
                    if (month > _month) {
                        return true;
                    } else if (month == _month) {
                        if (date > _date) {
                            return true;
                        } else if (date == _date) {
                            if (h > _h) {
                                return true;
                            } else if (h == _h) {
                                if (m >= _m) {
                                    return true;
                                } else {
                                    return false;
                                }
                            } else {
                                return false;
                            }
                        } else {
                            return false;
                        }
                    } else {
                        return false;
                    }
                } else {
                    return false;
                }
            }),
            (t.prototype.DestroyCustom = function () {
                try {
                    if (this.customAd != null) {
                        this.customAd.offLoad();
                        this.customAd = null;
                    }
                }
                catch (error) {
                    console.log("异常信息：" + error.message);
                }
            }),
            (t.prototype.createSystemInters = function () {
                return;
                var e = this;
                n.default.stringHasSpace(this.ID_System_Inters)
                    ? console.log("当前渠道系统插屏广告ID中含有空字符串,请检查后台系统插屏广告ID*********************")
                    : ((this.systemIntersAd = qg.createInterstitialAd({ posId: this.ID_System_Inters })),
                        this.systemIntersAd.onLoad(function () {
                            console.log("VIVO", "VIVO 系统插屏广告加载完成"), (e.loadSucc_SystemInters = !0);
                        }),
                        this.systemIntersAd.onError(function (t) {
                            e.NUM_SystemIntersLoadError++,
                                (e.loadSucc_SystemInters = !1),
                                console.log(
                                    "VIVO",
                                    e.NUM_SystemIntersLoadError,
                                    "VIVO 系统插屏加载失败：",
                                    JSON.stringify(t)
                                ),
                                e.NUM_SystemIntersLoadError < 5 &&
                                setTimeout(function () {
                                    e.createSystemInters();
                                }, 1e4);
                        }),
                        this.systemIntersAd.onClose(function () {
                            console.log("VIVO", "VIVO 系统插屏广告关闭"),
                                (e.NUM_IntersNowIntervalTime = 0),
                                (e.loadSucc_SystemInters = !1),
                                setTimeout(function () {
                                    e.createSystemInters();
                                }, 4e3);
                        }));
            }),
            (t.prototype.createCustomInters = function () {
                return;
                var e = this;
                n.default.stringHasSpace(this.ID_Custom_Inters)
                    ? console.log(
                        n.default.GameName +
                        "********当前渠道模板广告ID中含有空字符串,请检查后台模板广告ID*********************"
                    )
                    : qg.createCustomAd &&
                    ((this.customIntersAd = qg.createCustomAd({
                        posId: this.ID_Custom_Inters,
                        style: {
                            left: cc.winSize.width > cc.winSize.height ? cc.winSize.width / 2 - 156 : -300,
                            top: cc.winSize.width > cc.winSize.height ? 50 : 740
                        }
                    })),
                        this.customIntersAd.onLoad(function () {
                            console.log("VIVO", "VIVO 原生模板插屏广告加载完成"), (e.loadSucc_CuctomInters = !0);
                        }),
                        this.customIntersAd.onError(function (t) {
                            e.NUM_CustomIntersLoadError++,
                                (e.loadSucc_CuctomInters = !1),
                                console.log(
                                    "VIVO",
                                    e.NUM_CustomIntersLoadError,
                                    "VIVO 原生模板广告加载失败",
                                    JSON.stringify(t)
                                ),
                                e.NUM_CustomIntersLoadError < 5 &&
                                setTimeout(function () {
                                    e.createCustomInters();
                                }, 1e4);
                        }),
                        this.customIntersAd.onClose(function () {
                            console.log("VIVO", "VIVO 原生模板插屏广告关闭"),
                                (e.NUM_CustomIntersLoadError = 0),
                                (e.loadSucc_CuctomInters = !1),
                                setTimeout(function () {
                                    e.createCustomInters();
                                }, 1e3);
                        }));
            }),
            (t.prototype.loadNativeInterRes = function () {
                return;
                var e = this;
                n.default.stringHasSpace(this.ID_Native_Inters)
                    ? console.log("当前渠道原生插屏广告ID中含有空字符串,请检查后台原生插屏广告ID*********************")
                    : ((this.loadSucc_NativeAdInters = !1),
                        (this.loadSucc_NativeInters = !1),
                        (this.nativeIntersAd = qg.createNativeAd({ posId: this.ID_Native_Inters })),
                        (this.nativeIntersInfo = {
                            adId: null,
                            title: null,
                            desc: null,
                            Native_icon: null,
                            Native_BigImage: null
                        }),
                        (this.nativeIntersRes = {
                            NativeInterMask: null,
                            NativeIntersBg: null,
                            NativeIntersButton: null,
                            NativeIntersClose: null
                        }),
                        a.default.loadResArray(
                            [
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeInterMask.png",
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeIntersBg.png",
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeIntersButton.png",
                                "https://test2-1258404770.file.myqcloud.com/adInfo/SDK/SDKImage/Native/NativeIntersClose.png"
                            ],
                            function (t, o) {
                                (e.nativeIntersRes.NativeInterMask = o[0]),
                                    (e.nativeIntersRes.NativeIntersBg = o[1]),
                                    (e.nativeIntersRes.NativeIntersButton = o[2]),
                                    (e.nativeIntersRes.NativeIntersClose = o[3]),
                                    (e.loadSucc_NativeInters = !0);
                            }
                        ),
                        this.nativeIntersAd.onLoad(function (t) {
                            console.log("VIVO原生广告加载成功", JSON.stringify(t.adList));
                            var o = 0;
                            if (null != typeof t.adList && 0 != t.adList.length) {
                                if (
                                    ((o = t.adList.length - 1),
                                        console.log("VIVO 原生广告拉取:" + JSON.stringify(t.adList[o])),
                                        (e.nativeIntersInfo.adId = String(t.adList[o].adId)),
                                        (e.nativeIntersInfo.title = String(t.adList[o].title)),
                                        (e.nativeIntersInfo.desc = String(t.adList[o].desc)),
                                        "" != t.adList[o].icon)
                                ) {
                                    var n = function (t) {
                                        (e.nativeIntersInfo.Native_icon = t), (e.loadSucc_NativeAdInters = !0);
                                    };
                                    a.default.loadResCustom(String(t.adList[o].imgUrlList[0]), n);
                                } else (e.nativeIntersInfo.Native_icon = null), (e.loadSucc_NativeAdInters = !1);
                                0 != t.adList[o].imgUrlList.length
                                    ? ((n = function (t) {
                                        (e.nativeIntersInfo.Native_BigImage = t), (e.loadSucc_NativeAdInters = !0);
                                    }),
                                        a.default.loadResCustom(String(t.adList[o].imgUrlList[0]), n))
                                    : ((e.nativeIntersInfo.Native_BigImage = null), (e.loadSucc_NativeAdInters = !1));
                            } else console.log("VIVO 原生广告列表为空 return");
                        }),
                        this.nativeIntersAd.onError(function (e) {
                            console.log("VIVO 原生广告插屏加载失败：", JSON.stringify(e));
                        }),
                        this.nativeIntersAd.load(),
                        setInterval(function () {
                            e.nativeIntersAd && e.nativeIntersAd.load();
                        }, 1e3 * this.Control_Native_Update));
            }),
            (t.prototype.getIntersFlag = function () {
                return;
                return (
                    (this.loadSucc_NativeInters && this.loadSucc_NativeAdInters) ||
                    this.loadSucc_SystemInters ||
                    this.loadSucc_CuctomInters
                );
            }),
            (t.prototype.showInters = function () {
                return;
                if (this.TimeManager()) {
                    this.DestroyCustom();
                    try {
                        if (this.customAd == null) {
                            //@ts-ignore
                            this.customAd = qg.createCustomAd({
                                posId: Banner.Instance._customId,
                                style: {
                                    left: cc.view.getVisibleSize().width / 2 - 500,
                                    top: 100
                                }
                            });

                            this.customAd.onError(err => {
                                console.log("原生模板广告加载失败", JSON.stringify(err));
                            });
                            this.customAd.show().then(() => {
                                console.log('原生模板广告展示完成');
                            }).catch((err) => {
                                console.log('原生模板广告展示失败', JSON.stringify(err));
                            })

                        }
                    } catch (error) {
                        console.log(error);
                    }
                }
                return;
                var e = this;
                if (this.getIntersFlag()) {
                    if (
                        (console.log("VIVO 展示插屏广告"),
                            this.NUM_hasShowInters++,
                            this.SW_Inters_Desk &&
                            this.NUM_hasShowInters <= this.Inters_Add_Num &&
                            (console.log(
                                "VIVO 第" + this.Inters_Add_Num + "次插屏变添加桌面",
                                "当前第" + this.NUM_hasShowInters + "次"
                            ),
                                this.NUM_hasShowInters == this.Inters_Add_Num))
                    )
                        this.getAddDesktopFlag(function (t) {
                            t && (console.log("VIVO 插屏变添加桌面"), e.addDesktop(function () { }));
                        });
                    else {
                        if (
                            (console.log("===VIVO====插屏变视频==", this.NUN_hasVideoShowInters),
                                !this.getErrorControl() &&
                                this.Control_Video &&
                                this.Control_Inters_To_Video_Switch &&
                                this.NUN_hasVideoShowInters > 0)
                        ) {
                            if (
                                (console.log(
                                    "VIVO 第" + this.Control_Start_Inters_To_Video + "次插屏变视频",
                                    "当前第" + this.NUN_hasVideoShowInters + "次"
                                ),
                                    this.Control_Start_Inters_To_Video > 0 &&
                                    this.NUN_hasVideoShowInters == this.Control_Start_Inters_To_Video)
                            )
                                return (
                                    console.log("VIVO 首次插屏变视频"),
                                    this.NUN_hasVideoShowInters++,
                                    void this.showVideo(function () { })
                                );
                            if (
                                this.Control_Inters_To_Video > 0 &&
                                this.NUN_hasVideoShowInters % this.Control_Inters_To_Video == 0
                            )
                                return (
                                    console.log("VIVO 间隔插屏变视频"),
                                    this.NUN_hasVideoShowInters++,
                                    void this.showVideo(function () { })
                                );
                        }
                        if ((console.log("===VIVO===插屏控制====", this.Control_Inters), this.Control_Inters)) {
                            if (this.NUM_hasShowInters < this.Control_Start_Num)
                                return void console.log(
                                    "VIVO 插屏开始次数未达到",
                                    this.NUM_hasShowInters,
                                    "目标次数",
                                    this.Control_Start_Num
                                );
                            if (this.NUM_intersNowInterval < this.Control_Interval_Num)
                                return (
                                    console.log(
                                        "VIVO 插屏间隔次数未达到",
                                        this.NUM_intersNowInterval,
                                        "目标次数",
                                        this.Control_Interval_Num
                                    ),
                                    void this.NUM_intersNowInterval++
                                );
                            if (this.NUM_IntersNowIntervalTime < this.Control_Interval_Time)
                                return (
                                    console.log(
                                        "VIVO 插屏间隔时间未达到",
                                        this.NUM_IntersNowIntervalTime,
                                        "目标时间",
                                        this.Control_Interval_Time
                                    ),
                                    void (
                                        this.SW_Inters_Desk &&
                                        this.NUM_IntersNowToAddDesktop < this.Inters_Add_Num &&
                                        this.getAddDesktopFlag(function (t) {
                                            t &&
                                                (e.NUM_IntersNowToAddDesktop++,
                                                    e.addDesktop(function () {
                                                        console.log("VIVO 插屏间隔弹桌面");
                                                    }));
                                        })
                                    )
                                );
                        }
                        if (
                            ((this.NUM_intersNowInterval = 0),
                                console.log("===VIVO===插屏控制循环次数=====", this.Control_Inters_By_Turns),
                                this.Control_Inters && this.Control_Inters_By_Turns)
                        ) {
                            if (
                                (console.log(
                                    "VIVO  当前类型插屏循环次数：" + this.NUM_Inters_By_Turns,
                                    "  后台设置循环次数：" + this.Control_Inters_By_Turns_Num
                                ),
                                    this.NUM_Inters_By_Turns % this.Control_Inters_By_Turns_Num == 0)
                            ) {
                                var t = !1,
                                    o = Math.floor(this.NUM_Inters_By_Turns / this.Control_Inters_By_Turns_Num);
                                (o %= this.Control_Inter_By_Sort.length),
                                    (this.Now_Show_Inters_Type = this.Control_Inter_By_Sort[o]);
                                do {
                                    (0 == this.Now_Show_Inters_Type && this.loadSucc_SystemInters) ||
                                        (1 == this.Now_Show_Inters_Type && this.loadSucc_CuctomInters) ||
                                        (2 == this.Now_Show_Inters_Type &&
                                            this.loadSucc_NativeInters &&
                                            this.loadSucc_NativeAdInters)
                                        ? (t = !0)
                                        : ((t = !1),
                                            this.Now_Show_Inters_Type++,
                                            (this.Now_Show_Inters_Type =
                                                this.Now_Show_Inters_Type > this.Control_Inter_By_Sort.length
                                                    ? 0
                                                    : this.Now_Show_Inters_Type));
                                } while (!t);
                                console.log("VIVO  当前展示的插屏类型为:" + this.Now_Show_Inters_Type);
                            }
                            0 == this.Now_Show_Inters_Type
                                ? this.Control_Delay_Time > 0 &&
                                    Math.floor(100 * Math.random()) < this.Control_Delay_Prob
                                    ? (console.log("VIVO", "插屏延迟时间(ms):" + this.Control_Delay_Time),
                                        setTimeout(function () {
                                            e.showSystemInters();
                                        }, this.Control_Delay_Time))
                                    : this.showSystemInters()
                                : 1 == this.Now_Show_Inters_Type
                                    ? this.Control_Delay_Time > 0 &&
                                        Math.floor(100 * Math.random()) < this.Control_Delay_Prob
                                        ? (console.log("VIVO", "插屏延迟时间(ms):" + this.Control_Delay_Time),
                                            setTimeout(function () {
                                                e.showCustomInters();
                                            }, this.Control_Delay_Time))
                                        : this.showCustomInters()
                                    : 2 == this.Now_Show_Inters_Type &&
                                    (this.Control_Delay_Time > 0 &&
                                        Math.floor(100 * Math.random()) < this.Control_Delay_Prob
                                        ? (console.log("VIVO", "插屏延迟时间(ms):" + this.Control_Delay_Time),
                                            setTimeout(function () {
                                                e.showNativeInters();
                                            }, this.Control_Delay_Time))
                                        : this.showNativeInters()),
                                this.NUN_hasVideoShowInters++;
                        } else
                            this.loadSucc_NativeInters && this.loadSucc_NativeAdInters
                                ? this.showNativeInters()
                                : this.loadSucc_CuctomInters
                                    ? this.showCustomInters()
                                    : this.loadSucc_SystemInters
                                        ? this.showSystemInters()
                                        : console.log("VIVO 插屏出错了 ovo ovo"),
                                this.NUN_hasVideoShowInters++;
                        this.NUM_Inters_By_Turns++;
                    }
                } else console.log("VIVO  插屏广告暂未开启************请在后台确认是否开启***************");
            }),
            (t.prototype.showSystemInters = function () {
                return;
                this.systemIntersAd &&
                    this.loadSucc_SystemInters &&
                    this.systemIntersAd
                        .show()
                        .then(function () {
                            console.log("VIVO 系统插屏广告展示成功==================");
                        })
                        .catch(function (e) {
                            console.log("VIVO 系统插屏展示错误:" + JSON.stringify(e));
                        });
            }),
            (t.prototype.showCustomInters = function () {
                return;
                this.customIntersAd &&
                    this.loadSucc_CuctomInters &&
                    this.customIntersAd
                        .show()
                        .then(function () {
                            console.log("VIVO 原生模板插屏广告展示成功==================");
                        })
                        .catch(function (e) {
                            console.log("VIVO 原生模板插屏展示错误:" + JSON.stringify(e));
                        });
            }),
            (t.prototype.showNativeInters = function () {
                return;
                var e = this;
                this.node_nativeInters && (this.node_nativeInters.removeFromParent(), (this.node_nativeInters = null));
                var t = this.nativeIntersInfo.adId;
                this.nativeIntersAd.reportAdShow({ adId: t });
                var o = cc.director.getScene();
                (this.node_nativeInters = new cc.Node("node_nativeInters")),
                    o.addChild(this.node_nativeInters),
                    (this.node_nativeInters.zIndex = 30003),
                    (this.node_nativeInters.width = 2560),
                    (this.node_nativeInters.height = 2560),
                    (this.node_nativeInters.x = cc.winSize.width / 2),
                    (this.node_nativeInters.y = cc.winSize.height / 2),
                    "" != this.AdGroup && (this.node_nativeInters.group = this.AdGroup),
                    this.node_nativeInters.on(cc.Node.EventType.TOUCH_START, function () { });
                var a = new cc.Node("NativeInterMask");
                this.node_nativeInters.addChild(a),
                    a.addComponent(cc.Sprite),
                    (a.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(this.nativeIntersRes.NativeInterMask)),
                    (a.width = this.node_nativeInters.width),
                    (a.height = this.node_nativeInters.height),
                    (a.opacity = 150);
                var n = new cc.Node("NativeIntersBg");
                this.node_nativeInters.addChild(n),
                    n.addComponent(cc.Sprite),
                    (n.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(this.nativeIntersRes.NativeIntersBg));
                var i = new cc.Node("NativeIntersButton");
                n.addChild(i),
                    i.addComponent(cc.Sprite),
                    (i.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                        this.nativeIntersRes.NativeIntersButton
                    )),
                    cc.winSize.width < cc.winSize.height
                        ? ((n.width = 0.9 * cc.winSize.width),
                            (n.height = 0.9 * n.width),
                            (n.y = 0.05 * cc.winSize.height),
                            (i.width = 0.55 * n.width),
                            (i.height = 0.35 * i.width),
                            (i.y = -n.height / 2 - i.height / 2 - 0.3 * i.height))
                        : ((n.y = 50),
                            (n.height = 0.8 * cc.winSize.height),
                            (n.width = 1.15 * n.height),
                            (i.scale = 0.7),
                            (i.y = -n.height / 2 + i.height / 2 - 0.1 * i.height)),
                    i.on(cc.Node.EventType.TOUCH_START, function () {
                        e.nativeIntersAd.reportAdClick({ adId: t });
                    }),
                    n.on(cc.Node.EventType.TOUCH_START, function () {
                        e.nativeIntersAd.reportAdClick({ adId: t });
                    });
                var r = new cc.Node("titleLabel");
                n.addChild(r),
                    r.addComponent(cc.Label),
                    (r.getComponent(cc.Label).horizontalAlign = cc.Label.HorizontalAlign.CENTER),
                    (r.getComponent(cc.Label).verticalAlign = cc.Label.VerticalAlign.CENTER),
                    cc.winSize.width < cc.winSize.height
                        ? (r.getComponent(cc.Label).fontSize = (cc.view.getDesignResolutionSize().width / 1080) * 50)
                        : (r.getComponent(cc.Label).fontSize = (cc.view.getDesignResolutionSize().height / 1080) * 45),
                    (r.getComponent(cc.Label).lineHeight = r.getComponent(cc.Label).fontSize),
                    (r.color = cc.color(204, 124, 112)),
                    this.nativeIntersInfo.title.length >= 5 &&
                    (this.nativeIntersInfo.title = this.nativeIntersInfo.title.substring(0, 5)),
                    (r.getComponent(cc.Label).string = this.nativeIntersInfo.title),
                    (r.y = n.height / 2 - r.height / 2 - 0.06 * n.height),
                    this.nativeIntersInfo.desc.length >= 20 &&
                    (this.nativeIntersInfo.desc = this.nativeIntersInfo.desc.substring(0, 20));
                var s = new cc.Node("descLabel");
                if (
                    (n.addChild(s),
                        s.addComponent(cc.Label),
                        (s.getComponent(cc.Label).horizontalAlign = cc.Label.HorizontalAlign.CENTER),
                        (s.getComponent(cc.Label).verticalAlign = cc.Label.VerticalAlign.CENTER),
                        (s.getComponent(cc.Label).overflow = cc.Label.Overflow.SHRINK),
                        (s.width = 420),
                        (s.height = 60),
                        (s.getComponent(cc.Label).string = this.nativeIntersInfo.desc),
                        cc.winSize.width < cc.winSize.height
                            ? (s.getComponent(cc.Label).fontSize = (cc.view.getDesignResolutionSize().width / 1080) * 35)
                            : (s.getComponent(cc.Label).fontSize = (cc.view.getDesignResolutionSize().height / 1080) * 30),
                        (s.getComponent(cc.Label).lineHeight = s.getComponent(cc.Label).fontSize),
                        (s.color = cc.color(153, 124, 112)),
                        (s.y = n.height / 2 - s.height / 2 - 0.16 * n.height),
                        this.loadSucc_NativeImage)
                ) {
                    var l = new cc.Node("bigImage");
                    n.addChild(l),
                        l.addComponent(cc.Sprite),
                        (l.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                            this.nativeIntersInfo.Native_BigImage
                        )),
                        (l.width = 0.95 * n.height),
                        (l.height = l.width / 2),
                        (l.y = l.height / 2 - 0.25 * n.height);
                } else if (this.loadSucc_NativeIcon) {
                    var _ = new cc.Node("icon");
                    n.addChild(_),
                        _.addComponent(cc.Sprite),
                        (_.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(this.nativeIntersInfo.Native_icon)),
                        (_.height = 0.55 * n.height),
                        (_.width = _.height),
                        (_.y = _.height / 2 - 0.4 * n.height);
                }
                var c = new cc.Node("NativeIntersClose");
                n.addChild(c),
                    c.addComponent(cc.Sprite),
                    (c.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(
                        this.nativeIntersRes.NativeIntersClose
                    )),
                    (c.zIndex = 30010),
                    (c.x = n.width / 2 - ((c.width / 2) * 1.25 * n.width) / 1080 - 0.02 * n.width),
                    (c.y = n.height / 2 - ((c.width / 2) * 1.25 * n.width) / 1080 - 0.03 * n.width),
                    (c.scale = n.width / 1080),
                    c.on(cc.Node.EventType.TOUCH_START, function (o) {
                        e.getNativeIntersErrorControl()
                            ? e.nativeIntersAd.reportAdClick({ adId: t })
                            : ((e.NUM_IntersNowIntervalTime = 0),
                                e.node_nativeInters.removeFromParent(),
                                (e.node_nativeInters = null),
                                o.stopPropagation());
                    });
            }),
            (t.prototype.runIntersInterval = function () {
                return;
                var e = this;
                this.NUM_IntersIntervalTime > 0 &&
                    setInterval(function () {
                        e.NUM_IntersNowIntervalTime++;
                    }, 1e3);
            }),
            (t.prototype.createNavigateBoxBanner = function () {
                return;
                var e = this;
                n.default.stringHasSpace(this.ID_Box_Banner)
                    ? console.log(
                        n.default.GameName +
                        "当前渠道互推盒子横幅广告ID中含有空字符串,请检查后台互推盒子横幅广告ID*********************"
                    )
                    : qg.createBoxBannerAd
                        ? ((this.navigateBoxBannerAd = qg.createBoxBannerAd({ posId: this.ID_Box_Banner })),
                            this.navigateBoxBannerAd.onLoad(function () {
                                console.log("VIVO", "VIVO 互推盒子横幅广告加载完成"), (e.loadSucc_NavigateBoxBanner = !0);
                            }),
                            this.navigateBoxBannerAd.onError(function (t) {
                                (e.loadSucc_NavigateBoxBanner = !1),
                                    console.log("VIVO", "VIVO 互推盒子横幅广告出错:", JSON.stringify(t)),
                                    setTimeout(function () {
                                        e.createNavigateBoxBanner();
                                    }, 1e4);
                            }),
                            this.navigateBoxBannerAd.onClose(function () {
                                (e.isShow_NavigateSettle = !1), e.temp_hasShowBanner && e.showBanner();
                            }))
                        : console.log("VIVO", "VIVO 版本较低,不支持互推盒子广告");
            }),
            (t.prototype.getNavigateBoxBannerFlag = function () {
                return;
                return this.loadSucc_NavigateBoxBanner;
            }),
            (t.prototype.showNavigateBoxBanner = function () {
                return;
                this.isShow_NavigateSettle
                    ? console.log("VIVO", "已经调用过showNavigateBoxBanner,请勿重复调用")
                    : ((this.isShow_NavigateSettle = !0),
                        this.loadSucc_NavigateBoxBanner &&
                        ((this.temp_hasShowBanner = this.hasShowBanner),
                            this.hideBanner(),
                            this.navigateBoxBannerAd.show()));
            }),
            (t.prototype.hideNavigateBoxBanner = function () {
                return;
                this.isShow_NavigateSettle &&
                    ((this.isShow_NavigateSettle = !1),
                        this.navigateBoxBannerAd && (this.navigateBoxBannerAd.destroy(), this.createNavigateBoxBanner()));
            }),
            (t.prototype.createNavigateBoxPortal = function () {
                return;
                var e = this;
                n.default.stringHasSpace(this.ID_Box_View)
                    ? console.log(
                        n.default.GameName +
                        "当前渠道互推盒子九宫格广告ID中含有空字符串,请检查后台互推盒子九宫格广告ID*********************"
                    )
                    : qg.createBoxPortalAd
                        ? ((this.navigateBoxPortalAd = qg.createBoxPortalAd({ posId: this.ID_Box_View, marginTop: 300 })),
                            this.navigateBoxPortalAd.onLoad(function () {
                                console.log("VIVO", "VIVO 互推盒子九宫格广告加载完成"), (e.loadSucc_NavigateBoxPortal = !0);
                            }),
                            this.navigateBoxPortalAd.onError(function (t) {
                                console.log("VIVO", "VIVO 互推盒子九宫格广告加载/展示失败：", JSON.stringify(t)),
                                    (e.loadSucc_NavigateBoxPortal = !1),
                                    setTimeout(function () {
                                        e.createNavigateBoxPortal();
                                    }, 1e4);
                            }),
                            this.navigateBoxPortalAd.onClose(function () {
                                console.log("VIVO", "VIVO 互推盒子九宫格广告关闭"),
                                    e.navigateBoxPortalAd.isDestroyed || e.showNavigateBoxPortal();
                            }))
                        : console.log("VIVO", "VIVO 版本较低,不支持互推盒子广告");
            }),
            (t.prototype.getNavigateBoxPortalFlag = function () {
                return;
                return this.loadSucc_NavigateBoxPortal;
            }),
            (t.prototype.showNavigateBoxPortal = function () {
                return;
                this.loadSucc_NavigateBoxPortal &&
                    ((this.temp_hasShowBanner = this.hasShowBanner),
                        this.hideBanner(),
                        (this.navigateBoxPortalAd.isDestroyed = !1),
                        this.navigateBoxPortalAd.show());
            }),
            (t.prototype.hideNavigateBoxPortal = function () {
                return;
                this.navigateBoxPortalAd &&
                    ((this.navigateBoxPortalAd.isDestroyed = !0),
                        this.navigateBoxPortalAd.destroy(),
                        this.temp_hasShowBanner && this.showBanner());
            }),
            (t.prototype.setGroup = function (e) {
                this.AdGroup = e;
            }),
            (t.prototype.hasAddDesktopFunc = function () {
                return;
                return !0;
            }),
            (t.prototype.getAddDesktopFlag = function (e) {
                return;
                qg.hasShortcutInstalled({
                    success: function (t) {
                        e(!t);
                    }
                });
            }),
            (t.prototype.addDesktop = function (e) {
                qg.installShortcut({
                    success: function () {
                        e(!0);
                    },
                    fail: function (t) {
                        console.log("VIVO", "VIVO 创建桌面图标失败：", JSON.stringify(t)), e(!1);
                    },
                    complete: function () { }
                });
            }),
            (t.prototype.phoneVibrate = function (e) {
                "short" == e ? qg.vibrateShort() : "long" == e && qg.vibrateLong();
            }),
            (t.prototype.getErrorControl = function () {
                var e = !1;
                return this.getGameTestVersion() || (e = this.adErrorControl()), e;
            }),
            (t.prototype.getNativeImageErrorControl = function () {
                return !!this.getErrorControl() && this.getNativeImageError();
            }),
            (t.prototype.getNativeIntersErrorControl = function () {
                return !!this.getErrorControl() && this.getNativeIntersError();
            }),
            (t.prototype.getCustomErrorControl = function () {
                return !!this.getErrorControl() && this.getCustomError();
            }),
            t
        );
    })(e("AdInterface").default);
o.default = i;
